# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-k5test
_pkgname=k5test
pkgver=0.10.4
pkgrel=0
pkgdesc="A library for testing Python applications in self-contained Kerberos 5 environments"
url="https://github.com/pythongssapi/k5test"
arch="noarch"
license="MIT"
depends="python3 krb5-dev krb5 krb5-server"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/k/k5test/k5test-$pkgver.tar.gz"
builddir="$srcdir"/k5test-$pkgver

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	# no upstream tests
	PYTHONPATH=build/lib .testenv/bin/python3 -c "import k5test"
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
98d76e9df0a4afc0e6eada4909f9eb01b6fd96d53003bb0e8dcda01cd25ab3e338f917a00e985ec23b9fc8756ced6927f0578864c1c06a365e23268dd16d8401  k5test-0.10.4.tar.gz
"
